package com.wkbb.common.enums;

/**
 * @author luowenyan
 *  状态（2 草稿，1 发布 ，0 已删除）
 */
public enum DynamicStatusEnum {

    /**
     * 草稿
     */
    DRAFT(2,"草稿"),
    /**
     * 发布
     */
    RELEASE(1,"发布"),
    /**
     * 已删除
     */
    DELETED(0,"已删除");

    private DynamicStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (DynamicStatusEnum dynamicStatus : DynamicStatusEnum.values()) {
            if (dynamicStatus.getValue().intValue()==value) {
                return dynamicStatus.getDesc();
            }
        }
        return null;
    }
}
